@import "../css/reset.css";
@import "./fonts";
@import "~vue-tour/dist/vue-tour.css";

html {
  font-size: $html-font-size;
}

body {
  background: $darkest;
  font-family: $font-family;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -ms-overflow-style: none; /** IE11 */
  color: $grey;
  font-size: $fz-md;
  line-height: 16px;

  * {
    line-height: 1.2em;
    font-style: normal;
    -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
    -khtml-user-select: none; /* Konqueror HTML */
    -moz-user-select: none; /* Old versions of Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none;
  }

  input {
    -webkit-user-select: text;
  }
}

b {
  font-weight: $fw-bold;
}

a {
  outline: none;
}

.selectable {
  user-select: text !important;

  * {
    user-select: text !important;
  }
}

#app {
  height: 100vh;
}

.background {
  &_error {
    background: $error-gradient;
    background-blend-mode: overlay, normal;
  }
}

.text {
  &_descr {
    font-family: Inter;
    font-style: normal;
    font-weight: 400;
    font-size: 0.8125rem;
    line-height: 16px;
    color: #7b7d82;
  }

  &_link {
    color: $primary;
    text-decoration: underline;
    transition: $transition-1;
    cursor: pointer;

    &:hover {
      color: white;
    }
  }

  &_select {
    user-select: text;
  }

  &_wrap {
    &_none {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }
  }

  &_align {
    &_left {
      text-align: left;
    }

    &_center {
      text-align: center;
    }

    &_right {
      text-align: right;
    }
  }

  &_weight {
    &_bold {
      font-weight: $fw-bold;
    }
  }
}

/*========== scroll ==========*/

::-webkit-scrollbar {
  width: 4px;
  height: 6px;
  transition: $transition-1;
}

::-webkit-scrollbar-thumb {
  background-color: $grey;
  border-radius: $br-md;
  transition: $transition-1;
}

::-webkit-scrollbar-thumb:hover {
  background-color: $white-ghost;
}

::-webkit-scrollbar-track {
  border-radius: $br-md;
  transition: $transition-1;
}

/*========== main container ==========*/

.main {
  margin: 0 auto;

  &__wrapper {
    background: $primary;
    height: 100%;
    position: relative;
  }

  &__tour {
    position: absolute;
    width: 100%;
    left: 0px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    height: 100%;
  }
}

/*========== Tooltip ==========*/

.tooltip {
  display: block !important;
  z-index: 10000;

  &_left {
    .tooltip-arrow {
      left: 15px !important;
    }
  }

  .tooltip-inner {
    background: $grey-dark;
    color: white;
    border-radius: $br-xs;
    padding: $padding-xs;
    font-size: $fz-sm;
    box-shadow: $shadow-4;
    backdrop-filter: $blur;
  }

  .tooltip-arrow {
    width: 0;
    height: 0;
    border-style: solid;
    position: absolute;
    margin: 5px;
    border-color: $grey-dark;
    z-index: 1;
  }

  &[x-placement^="top"] {
    margin-bottom: 5px;

    .tooltip-arrow {
      border-width: 5px 5px 0 5px;
      border-left-color: transparent !important;
      border-right-color: transparent !important;
      border-bottom-color: transparent !important;
      bottom: -5px;
      left: calc(50% - 5px);
      margin-top: 0;
      margin-bottom: 0;
    }
  }

  &[x-placement^="bottom"] {
    margin-top: 5px;

    .tooltip-arrow {
      border-width: 0 5px 5px 5px;
      border-left-color: transparent !important;
      border-right-color: transparent !important;
      border-top-color: transparent !important;
      top: -5px;
      left: calc(50% - 5px);
      margin-top: 0;
      margin-bottom: 0;
    }
  }

  &[x-placement^="right"] {
    margin-left: 5px;

    .tooltip-arrow {
      border-width: 5px 5px 5px 0;
      border-left-color: transparent !important;
      border-top-color: transparent !important;
      border-bottom-color: transparent !important;
      left: -5px;
      top: calc(50% - 5px);
      margin-left: 0;
      margin-right: 0;
    }
  }

  &[x-placement^="left"] {
    margin-right: 5px;

    .tooltip-arrow {
      border-width: 5px 0 5px 5px;
      border-top-color: transparent !important;
      border-right-color: transparent !important;
      border-bottom-color: transparent !important;
      right: -5px;
      top: calc(50% - 5px);
      margin-left: 0;
      margin-right: 0;
    }
  }

  &[aria-hidden="true"] {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.15s, visibility 0.15s;
  }

  &[aria-hidden="false"] {
    visibility: visible;
    opacity: 1;
    transition: opacity 0.15s;
  }
}

table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 $padding-xxs;
}

tbody {
  tr {
    background: $dark;
    box-shadow: $shadow-2;
    // backdrop-filter: $blur;
    border-radius: $br-xxs;
  }

  td {
    font-feature-settings: "salt" on;
    color: $white;

    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;

    &:first-child {
      border-left: 1px solid transparent;
    }

    &:last-child {
      border-right: 1px solid transparent;
    }
  }
}

th,
td {
  height: 48px;
  box-sizing: border-box;
  padding: 0 $padding-md;
  vertical-align: middle;
}

th {
  font-weight: $fw-bold;
  font-size: $fz-xs;
  line-height: 16px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-feature-settings: "salt" on;
  color: $grey;
}

.table {
  &__row {
    &_active {
      background: linear-gradient(
          0deg,
          rgba(10, 151, 149, 0.2),
          rgba(10, 151, 149, 0.2)
        ),
        #131416;
      background-blend-mode: normal;

      td {
        border-color: $primary !important;
      }
    }
  }
}
